package com.soft.service;

import java.math.BigDecimal;
import java.util.List;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.Assert;

import com.soft.entity.Operator;

@SpringBootTest
public class OperatorServiceTest {
@Autowired
private OperatorService operatorService;
@Test
public void queryByMoneyId() {
	List<Operator> operatorList = operatorService.queryByMoneyId((long) 19);
	Assert.notEmpty(operatorList, "查询错误");
}
@Test
public void insertOperatorTest() {
	int num = operatorService.insertOperator(3l,"ggbond",new BigDecimal ("900"));
	Assert.isTrue(num==1, "增加管理员错误");
}
@Test
public void updateOperatorTest() {
	int num = operatorService.updateOperator(3l,"辰星",new BigDecimal ("800"));
	Assert.isTrue(num==1, "修改管理员错误");
}
}
